#ifndef _TEST_OCV_SOC_H
#define _TEST_OCV_SOC_H

#define P_CHARGE_DET        P20
#define P_CHARGE_CONTROL    P05
#define CHARGE_ENABLE       1
#define CHARGE_DISABLE      0



#define P_OVER_CURRENT_DET  P22
#define LEVEL_PROTECT       1
#define LEVEL_NO_PROTECT    0

#define P_DSG P07
#define P_CHG P06
#define DSG_ENABLE 0
#define DSG_DISABLE 1



typedef enum ReadAfeState {
    STATE_READ_CURR,               // 0-24 -> 2ms*25 = 50ms
    STATE_TEMP_CHANNEL_CONTROL_ON, // 25 -> 50ms
    STATE_READ_TEMP,               // 26 -> 52ms
    STATE_TEMP_CHANNEL_CONTROL_OFF,// 27 -> 54ms
    STATE_SET_VOLT_CHANNEL,        // 28 -> 56ms
    STATE_READ_CELL_VOLT,          // 29 -> 58ms
}ReadAfeState_t;



void OCV_test(void);
void key_init(void);






#endif // !_TEST_OCV_SOC_H